{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\Dr. Clifford\Dropbox\MTurk\MTurk Cheating\Replication Files\Log Files\retrostudy2 log.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}21 Oct 2019, 12:41:23

{com}. do "C:\Users\DR051F~1.CLI\AppData\Local\Temp\STD32e4_000000.tmp"
{txt}
{com}. clear all
{res}{txt}
{com}. 
. **set working directory to Data folder
. use "retrostudy2 data.dta"
{txt}
{com}. 
. *ip status
. gen nonus=1
{txt}
{com}. replace nonus=0 if countryname=="United States"
{txt}(1,313 real changes made)

{com}. gen blockfull=block
{txt}(201 missing values generated)

{com}. replace blockfull=3 if nonus==1 & block==0
{txt}(100 real changes made)

{com}. label define blocklab 0 "Valid" 1 "VPS User" 2 "VPS Uncertain" 3 "Foreign"
{txt}
{com}. label values blockfull blocklab
{txt}
{com}. recode blockfull 0=1 1/3=0, gen(valid)
{txt}(1440 differences between blockfull and valid)

{com}. 
. *attention checks
. gen check1=0
{txt}
{com}. replace check1=1 if ac1_1==0 & ac1_2==100
{txt}(875 real changes made)

{com}. replace check1=. if ac1_1==. | ac1_2==.
{txt}(202 real changes made, 202 to missing)

{com}. gen check2=0
{txt}
{com}. replace check2=1 if ac2_1==100 & ac2_2==0
{txt}(1,070 real changes made)

{com}. replace check2=. if ac2_1==. | ac2_2==.
{txt}(202 real changes made, 202 to missing)

{com}. gen checkfails=check1+check2
{txt}(202 missing values generated)

{com}. recode checkfails 0=2 2=0
{txt}(checkfails: 988 changes made)

{com}. tab checkfails 

 {txt}checkfails {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          0 {c |}{res}        747       51.91       51.91
{txt}          1 {c |}{res}        451       31.34       83.25
{txt}          2 {c |}{res}        241       16.75      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}      1,439      100.00
{txt}
{com}. 
. *check based on reported city
. gen failcity=citycheck
{txt}(451 missing values generated)

{com}. recode failcity 1/10=1 11=0
{txt}(failcity: 1190 changes made)

{com}. tab failcity

   {txt}failcity {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          0 {c |}{res}      1,177       98.91       98.91
{txt}          1 {c |}{res}         13        1.09      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}      1,190      100.00
{txt}
{com}. 
. *age check
. gen born=yrborn+7
{txt}(203 missing values generated)

{com}. recode age 1989=29 1993=25
{txt}(age: 2 changes made)

{com}. gen failage=born-age
{txt}(449 missing values generated)

{com}. recode failage 0/1=0 *=1
{txt}(failage: 820 changes made)

{com}. replace failage=. if born==. | age==.
{txt}(449 real changes made, 449 to missing)

{com}. tab failage

    {txt}failage {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          0 {c |}{res}      1,144       95.97       95.97
{txt}          1 {c |}{res}         48        4.03      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}      1,192      100.00
{txt}
{com}. 
. *data quality index
. alpha fail* susp*, item gen(suspindex) casewise

{txt}Test scale = mean(unstandardized items)

                                                            average
                             item-test     item-rest       interitem
Item         {c |}  Obs  Sign   correlation   correlation     covariance      alpha
{hline 13}{c +}{hline 65}
failcity{col 14}{c |}{res}{col 16}1190{col 24}+{col 31} 0.4461{col 45} 0.2759{col 59} .0068106{col 73} 0.4161
{txt}failage{col 14}{c |}{res}{col 16}1190{col 24}+{col 31} 0.5682{col 45} 0.2473{col 59} .0054707{col 73} 0.4017
{txt}susplocation{col 14}{c |}{res}{col 16}1190{col 24}+{col 31} 0.2833{col 45} 0.1131{col 59} .0083002{col 73} 0.4719
{txt}susptask{col 14}{c |}{res}{col 16}1190{col 24}+{col 31} 0.7975{col 45} 0.3404{col 59} .0028893{col 73} 0.3718
{txt}suspcomments{col 14}{c |}{res}{col 16}1190{col 24}+{col 31} 0.6277{col 45} 0.3675{col 59}  .004301{col 73} 0.3251
{txt}{hline 13}{c +}{hline 65}
Test scale{col 14}{c |}{res}{col 59} .0055543{col 73} 0.4597
{txt}{hline 13}{c BT}{hline 65}

{com}. recode suspindex .2/.8=1, gen(suspdi)
{txt}(185 differences between suspindex and suspdi)

{com}. gen susp5 = suspindex*5
{txt}(451 missing values generated)

{com}. 
. *pid and ideology
. gen PID = party
{txt}(449 missing values generated)

{com}. recode PID 1=2 2=6 3/4=4 -99=.
{txt}(PID: 1177 changes made)

{com}. recode PID 4=3 if partylean==-1
{txt}(PID: 146 changes made)

{com}. recode PID 4=5 if partylean==1
{txt}(PID: 71 changes made)

{com}. recode PID 2=1 if partystrong==1
{txt}(PID: 254 changes made)

{com}. recode PID 6=7 if partystrong==1
{txt}(PID: 159 changes made)

{com}. recode ideology 1=5 2=4 4=2 5=1
{txt}(ideology: 984 changes made)

{com}. 
. 
. ************
. * Analysis *
. ************
. 
. tab blockfull

    {txt}blockfull {c |}      Freq.     Percent        Cum.
{hline 14}{c +}{hline 35}
        Valid {c |}{res}      1,053       73.13       73.13
{txt}     VPS User {c |}{res}        278       19.31       92.43
{txt}VPS Uncertain {c |}{res}          9        0.63       93.06
{txt}      Foreign {c |}{res}        100        6.94      100.00
{txt}{hline 14}{c +}{hline 35}
        Total {c |}{res}      1,440      100.00
{txt}
{com}. 
. *attention check failure by ip status
. proportion checkfails if blockfull==0
{res}
{txt}Proportion estimation{col 35}Number of obs{col 51}= {res}     1,053

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 14}{c |}{col 37}             L{col 51}ogit
{col 14}{c |} Proportion{col 26}   Std. Err.{col 38}     [95% Con{col 51}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
{res}checkfails   {txt}{c |}
{space 11}0 {c |}{col 14}{res}{space 2} .5868946{col 26}{space 2} .0151739{col 37}{space 5} .5568371{col 51}{space 3} .6163181
{txt}{space 11}1 {c |}{col 14}{res}{space 2} .3181387{col 26}{space 2}  .014353{col 37}{space 5} .2906623{col 51}{space 3}  .346942
{txt}{space 11}2 {c |}{col 14}{res}{space 2} .0949668{col 26}{space 2} .0090345{col 37}{space 5} .0786592{col 51}{space 3}  .114236
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}. proportion checkfails if blockfull==1
{res}
{txt}Proportion estimation{col 35}Number of obs{col 51}= {res}       277

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 14}{c |}{col 37}             L{col 51}ogit
{col 14}{c |} Proportion{col 26}   Std. Err.{col 38}     [95% Con{col 51}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
{res}checkfails   {txt}{c |}
{space 11}0 {c |}{col 14}{res}{space 2} .3104693{col 26}{space 2} .0278001{col 37}{space 5} .2585407{col 51}{space 3} .3676562
{txt}{space 11}1 {c |}{col 14}{res}{space 2} .2960289{col 26}{space 2} .0274287{col 37}{space 5} .2450141{col 51}{space 3} .3527033
{txt}{space 11}2 {c |}{col 14}{res}{space 2} .3935018{col 26}{space 2} .0293527{col 37}{space 5} .3374374{col 51}{space 3} .4525192
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}. proportion checkfails if blockfull==2
{res}
{txt}Proportion estimation{col 35}Number of obs{col 51}= {res}         9

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 14}{c |}{col 37}             L{col 51}ogit
{col 14}{c |} Proportion{col 26}   Std. Err.{col 38}     [95% Con{col 51}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
{res}checkfails   {txt}{c |}
{space 11}0 {c |}{col 14}{res}{space 2} .2222222{col 26}{space 2} .1385799{col 37}{space 5}  .043038{col 51}{space 3} .6447758
{txt}{space 11}1 {c |}{col 14}{res}{space 2} .6666667{col 26}{space 2} .1571348{col 37}{space 5} .2814169{col 51}{space 3}  .910824
{txt}{space 11}2 {c |}{col 14}{res}{space 2} .1111111{col 26}{space 2} .1047566{col 37}{space 5} .0107151{col 51}{space 3} .5905997
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}. proportion checkfails if blockfull==3
{res}
{txt}Proportion estimation{col 35}Number of obs{col 51}= {res}       100

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 14}{c |}{col 37}             L{col 51}ogit
{col 14}{c |} Proportion{col 26}   Std. Err.{col 38}     [95% Con{col 51}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
{res}checkfails   {txt}{c |}
{space 11}0 {c |}{col 14}{res}{space 2}      .41{col 26}{space 2} .0491833{col 37}{space 5} .3170422{col 51}{space 3} .5098656
{txt}{space 11}1 {c |}{col 14}{res}{space 2}      .28{col 26}{space 2} .0448999{col 37}{space 5}  .199986{col 51}{space 3} .3769436
{txt}{space 11}2 {c |}{col 14}{res}{space 2}      .31{col 26}{space 2} .0462493{col 37}{space 5}  .226331{col 51}{space 3} .4082769
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}. 
. tab checkfails blockfull if (blockfull==0 | blockfull==1), col chi2
{txt}
{c TLC}{hline 19}{c TRC}
{c |} Key{col 21}{c |}
{c LT}{hline 19}{c RT}
{c |}{space 5}{it:frequency}{col 21}{c |}
{c |}{space 1}{it:column percentage}{col 21}{c |}
{c BLC}{hline 19}{c BRC}

           {c |}       blockfull
checkfails {c |}     Valid   VPS User {c |}     Total
{hline 11}{c +}{hline 22}{c +}{hline 10}
         0 {c |}{res}       618         86 {txt}{c |}{res}       704 
           {txt}{c |}{res}     58.69      31.05 {txt}{c |}{res}     52.93 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         1 {c |}{res}       335         82 {txt}{c |}{res}       417 
           {txt}{c |}{res}     31.81      29.60 {txt}{c |}{res}     31.35 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         2 {c |}{res}       100        109 {txt}{c |}{res}       209 
           {txt}{c |}{res}      9.50      39.35 {txt}{c |}{res}     15.71 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
     Total {c |}{res}     1,053        277 {txt}{c |}{res}     1,330 
           {txt}{c |}{res}    100.00     100.00 {txt}{c |}{res}    100.00 

{txt}          Pearson chi2({res}2{txt}) = {res}156.3810  {txt} Pr = {res}0.000
{txt}
{com}. tab checkfails blockfull if (blockfull==0 | blockfull==3), col chi2
{txt}
{c TLC}{hline 19}{c TRC}
{c |} Key{col 21}{c |}
{c LT}{hline 19}{c RT}
{c |}{space 5}{it:frequency}{col 21}{c |}
{c |}{space 1}{it:column percentage}{col 21}{c |}
{c BLC}{hline 19}{c BRC}

           {c |}       blockfull
checkfails {c |}     Valid    Foreign {c |}     Total
{hline 11}{c +}{hline 22}{c +}{hline 10}
         0 {c |}{res}       618         41 {txt}{c |}{res}       659 
           {txt}{c |}{res}     58.69      41.00 {txt}{c |}{res}     57.16 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         1 {c |}{res}       335         28 {txt}{c |}{res}       363 
           {txt}{c |}{res}     31.81      28.00 {txt}{c |}{res}     31.48 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         2 {c |}{res}       100         31 {txt}{c |}{res}       131 
           {txt}{c |}{res}      9.50      31.00 {txt}{c |}{res}     11.36 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
     Total {c |}{res}     1,053        100 {txt}{c |}{res}     1,153 
           {txt}{c |}{res}    100.00     100.00 {txt}{c |}{res}    100.00 

{txt}          Pearson chi2({res}2{txt}) = {res} 42.5899  {txt} Pr = {res}0.000
{txt}
{com}. tab checkfails blockfull if (blockfull==1 | blockfull==3), col chi2
{txt}
{c TLC}{hline 19}{c TRC}
{c |} Key{col 21}{c |}
{c LT}{hline 19}{c RT}
{c |}{space 5}{it:frequency}{col 21}{c |}
{c |}{space 1}{it:column percentage}{col 21}{c |}
{c BLC}{hline 19}{c BRC}

           {c |}       blockfull
checkfails {c |}  VPS User    Foreign {c |}     Total
{hline 11}{c +}{hline 22}{c +}{hline 10}
         0 {c |}{res}        86         41 {txt}{c |}{res}       127 
           {txt}{c |}{res}     31.05      41.00 {txt}{c |}{res}     33.69 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         1 {c |}{res}        82         28 {txt}{c |}{res}       110 
           {txt}{c |}{res}     29.60      28.00 {txt}{c |}{res}     29.18 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         2 {c |}{res}       109         31 {txt}{c |}{res}       140 
           {txt}{c |}{res}     39.35      31.00 {txt}{c |}{res}     37.14 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
     Total {c |}{res}       277        100 {txt}{c |}{res}       377 
           {txt}{c |}{res}    100.00     100.00 {txt}{c |}{res}    100.00 

{txt}          Pearson chi2({res}2{txt}) = {res}  3.6049  {txt} Pr = {res}0.165
{txt}
{com}. 
. cd "../Output Figures"
{res}C:\Users\Dr. Clifford\Dropbox\MTurk\MTurk Cheating\Replication Files\Output Figures
{txt}
{com}. 
. *left-hand panel of figure 4 - attention check failures by ip status
. reg checkfails ibn.blockfull, nocons

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}     1,439
{txt}{hline 13}{c +}{hline 34}   F(4, 1435)      = {res}   336.48
{txt}       Model {c |} {res} 684.839472         4  171.209868   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 730.160528     1,435  .508822668   {txt}R-squared       ={res}    0.4840
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.4825
{txt}       Total {c |} {res}       1415     1,439  .983321751   {txt}Root MSE        =   {res} .71332

{txt}{hline 15}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}    checkfails{col 16}{c |}      Coef.{col 28}   Std. Err.{col 40}      t{col 48}   P>|t|{col 56}     [95% Con{col 69}f. Interval]
{hline 15}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 5}blockfull {c |}
{space 8}Valid  {c |}{col 16}{res}{space 2} .5080722{col 28}{space 2} .0219821{col 39}{space 1}   23.11{col 48}{space 3}0.000{col 56}{space 4} .4649517{col 69}{space 3} .5511927
{txt}{space 5}VPS User  {c |}{col 16}{res}{space 2} 1.083032{col 28}{space 2} .0428591{col 39}{space 1}   25.27{col 48}{space 3}0.000{col 56}{space 4} .9989592{col 69}{space 3} 1.167106
{txt}VPS Uncertain  {c |}{col 16}{res}{space 2} .8888889{col 28}{space 2} .2377727{col 39}{space 1}    3.74{col 48}{space 3}0.000{col 56}{space 4} .4224696{col 69}{space 3} 1.355308
{txt}{space 6}Foreign  {c |}{col 16}{res}{space 2}       .9{col 28}{space 2} .0713318{col 39}{space 1}   12.62{col 48}{space 3}0.000{col 56}{space 4} .7600742{col 69}{space 3} 1.039926
{txt}{hline 15}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. est store c1
{txt}
{com}. coefplot c1, vert ylab(0(.5)1.5) label(1 "block=1") recast(bar) barwidth(.5) color(gs10) citop ///
>         coeflabels(0.blockfull="Valid" 1.blockfull=`""VPS" "User""' 2.blockfull=`""VPS" "Uncertain""' 3.blockfull="Foreign ") ///
>         ytitle("Number of Failed Attention Checks") subtitle("Attention Checks") saving(attention.gph, replace)
{res}{txt}(file attention.gph saved)

{com}. 
. *valid respondents by attention check failure
. tab valid

  {txt}RECODE of {c |}
  blockfull {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          0 {c |}{res}        387       26.88       26.88
{txt}          1 {c |}{res}      1,053       73.13      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}      1,440      100.00
{txt}
{com}. tab valid if checkfails<2

  {txt}RECODE of {c |}
  blockfull {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          0 {c |}{res}        245       20.45       20.45
{txt}          1 {c |}{res}        953       79.55      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}      1,198      100.00
{txt}
{com}. tab valid if checkfails==0

  {txt}RECODE of {c |}
  blockfull {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          0 {c |}{res}        129       17.27       17.27
{txt}          1 {c |}{res}        618       82.73      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        747      100.00
{txt}
{com}.         
. *data quality checks
. tab suspdi

  {txt}RECODE of {c |}
  suspindex {c |}
(mean(unsta {c |}
  ndardized {c |}
    items)) {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          0 {c |}{res}      1,005       84.45       84.45
{txt}          1 {c |}{res}        185       15.55      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}      1,190      100.00
{txt}
{com}. 
. proportion suspdi if blockfull==0
{res}
{txt}Proportion estimation{col 35}Number of obs{col 51}= {res}       947

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 14}{c |}{col 37}             L{col 51}ogit
{col 14}{c |} Proportion{col 26}   Std. Err.{col 38}     [95% Con{col 51}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
{res}suspdi       {txt}{c |}
{space 11}0 {c |}{col 14}{res}{space 2} .9144667{col 26}{space 2} .0090882{col 37}{space 5} .8948637{col 51}{space 3} .9306978
{txt}{space 11}1 {c |}{col 14}{res}{space 2} .0855333{col 26}{space 2} .0090882{col 37}{space 5} .0693022{col 51}{space 3} .1051363
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}. est store m1
{txt}
{com}. proportion suspdi if blockfull==1
{res}
{txt}Proportion estimation{col 35}Number of obs{col 51}= {res}       166

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 14}{c |}{col 37}             L{col 51}ogit
{col 14}{c |} Proportion{col 26}   Std. Err.{col 38}     [95% Con{col 51}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
{res}suspdi       {txt}{c |}
{space 11}0 {c |}{col 14}{res}{space 2} .5180723{col 26}{space 2} .0387822{col 37}{space 5} .4416735{col 51}{space 3} .5936354
{txt}{space 11}1 {c |}{col 14}{res}{space 2} .4819277{col 26}{space 2} .0387822{col 37}{space 5} .4063646{col 51}{space 3} .5583265
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}. est store m2
{txt}
{com}. proportion suspdi if blockfull==2
{res}
{txt}Proportion estimation{col 35}Number of obs{col 51}= {res}         8

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 14}{c |}{col 37}             L{col 51}ogit
{col 14}{c |} Proportion{col 26}   Std. Err.{col 38}     [95% Con{col 51}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
{res}suspdi       {txt}{c |}
{space 11}0 {c |}{col 14}{res}{space 2}      .75{col 26}{space 2} .1530931{col 37}{space 5} .3032022{col 51}{space 3} .9538813
{txt}{space 11}1 {c |}{col 14}{res}{space 2}      .25{col 26}{space 2} .1530931{col 37}{space 5} .0461187{col 51}{space 3} .6967978
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}. est store m3
{txt}
{com}. proportion suspdi if blockfull==3
{res}
{txt}Proportion estimation{col 35}Number of obs{col 51}= {res}        69

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 14}{c |}{col 37}             L{col 51}ogit
{col 14}{c |} Proportion{col 26}   Std. Err.{col 38}     [95% Con{col 51}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
{res}suspdi       {txt}{c |}
{space 11}0 {c |}{col 14}{res}{space 2} .6811594{col 26}{space 2} .0561031{col 37}{space 5} .5606076{col 51}{space 3} .7815261
{txt}{space 11}1 {c |}{col 14}{res}{space 2} .3188406{col 26}{space 2} .0561031{col 37}{space 5} .2184739{col 51}{space 3} .4393924
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}. est store m4
{txt}
{com}. coefplot m1 m2 m3 m4, keep(1) vert citype(logit) legend(off) recast(bar) barwidth(.1) color(gs10) citop ciopts(lcolor(gs5)) ///
>         xlab(.7 "Valid" .9 `""VPS" "User""' 1.1 `""VPS" "Uncertain""' 1.3 "Foreign") ///
>         ylab(0(.25).75) ytitle("Proportion Flagged for Low-Quality Data") ///
>         subtitle("Data Quality Checks") saving(quality.gph, replace)
{res}{txt}(file quality.gph saved)

{com}. 
. graph combine attention.gph quality.gph, saving(figure4.gph, replace)
{res}{txt}(file figure4.gph saved)

{com}. 
. *appendix a6. analysis of individual quality checks
. sum failcity failage susplocation susptask suspcomments

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}failcity {c |}{res}      1,190    .0109244    .1039909          0          1
{txt}{space 5}failage {c |}{res}      1,192    .0402685    .1966707          0          1
{txt}susplocation {c |}{res}      1,641    .0481414    .2141302          0          1
{txt}{space 4}susptask {c |}{res}      1,641    .3546618    .4785565          0          1
{txt}suspcomments {c |}{res}      1,641    .0231566    .1504466          0          1
{txt}
{com}. corr failcity failage susplocation susptask suspcomments
{txt}(obs=1,190)

             {c |} failcity  failage susplo~n susptask suspco~s
{hline 13}{c +}{hline 45}
    failcity {c |}{res}   1.0000
     {txt}failage {c |}{res}   0.2250   1.0000
{txt}susplocation {c |}{res}   0.0743   0.0248   1.0000
    {txt}susptask {c |}{res}   0.1909   0.1814   0.0757   1.0000
{txt}suspcomments {c |}{res}   0.1648   0.1814   0.1323   0.3253   1.0000

{txt}
{com}. 
. *appendix a6. distribution of quality check failures
. hist susp5, by(blockfull, rows(1) note("")  title("Number of Failed Quality Checks by VPS Status (Study 2)")) d xlab(0(1)4) xtitle("Number of Failed Quality Checks") saving(checksbystatus2.gph, replace)
{res}{txt}(file checksbystatus2.gph saved)

{com}. 
. *table a2. relationship between PID & ideology
. bysort blockfull: corr PID ideology

{txt}{hline}
-> blockfull = Valid
(obs=939)

             {c |}      PID ideology
{hline 13}{c +}{hline 18}
         PID {c |}{res}   1.0000
    {txt}ideology {c |}{res}   0.8368   1.0000


{txt}{hline}
-> blockfull = VPS User
(obs=166)

             {c |}      PID ideology
{hline 13}{c +}{hline 18}
         PID {c |}{res}   1.0000
    {txt}ideology {c |}{res}   0.3013   1.0000


{txt}{hline}
-> blockfull = VPS Uncertain
(obs=8)

             {c |}      PID ideology
{hline 13}{c +}{hline 18}
         PID {c |}{res}   1.0000
    {txt}ideology {c |}{res}   0.9517   1.0000


{txt}{hline}
-> blockfull = Foreign
(obs=67)

             {c |}      PID ideology
{hline 13}{c +}{hline 18}
         PID {c |}{res}   1.0000
    {txt}ideology {c |}{res}   0.4502   1.0000


{txt}{hline}
-> blockfull = .
no observations


{com}. reg PID i.blockfull##c.ideology

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}     1,180
{txt}{hline 13}{c +}{hline 34}   F(7, 1172)      = {res}   222.78
{txt}       Model {c |} {res} 3009.16368         7  429.880525   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 2261.49734     1,172  1.92960524   {txt}R-squared       ={res}    0.5709
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.5684
{txt}       Total {c |} {res} 5270.66102     1,179   4.4704504   {txt}Root MSE        =   {res} 1.3891

{txt}{hline 21}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}                 PID{col 22}{c |}      Coef.{col 34}   Std. Err.{col 46}      t{col 54}   P>|t|{col 62}     [95% Con{col 75}f. Interval]
{hline 21}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 11}blockfull {c |}
{space 11}VPS User  {c |}{col 22}{res}{space 2} 2.971263{col 34}{space 2} .3038541{col 45}{space 1}    9.78{col 54}{space 3}0.000{col 62}{space 4} 2.375104{col 75}{space 3} 3.567421
{txt}{space 6}VPS Uncertain  {c |}{col 22}{res}{space 2}-1.283059{col 34}{space 2} 1.309901{col 45}{space 1}   -0.98{col 54}{space 3}0.328{col 62}{space 4}-3.853072{col 75}{space 3} 1.286954
{txt}{space 12}Foreign  {c |}{col 22}{res}{space 2} 1.603005{col 34}{space 2} .4122763{col 45}{space 1}    3.89{col 54}{space 3}0.000{col 62}{space 4} .7941226{col 75}{space 3} 2.411887
{txt}{space 20} {c |}
{space 12}ideology {c |}{col 22}{res}{space 2} 1.342156{col 34}{space 2} .0368182{col 45}{space 1}   36.45{col 54}{space 3}0.000{col 62}{space 4} 1.269919{col 75}{space 3} 1.414393
{txt}{space 20} {c |}
blockfull#c.ideology {c |}
{space 11}VPS User  {c |}{col 22}{res}{space 2}-.8200392{col 34}{space 2} .0847443{col 45}{space 1}   -9.68{col 54}{space 3}0.000{col 62}{space 4}-.9863066{col 75}{space 3}-.6537717
{txt}{space 6}VPS Uncertain  {c |}{col 22}{res}{space 2} .4345427{col 34}{space 2} .3888802{col 45}{space 1}    1.12{col 54}{space 3}0.264{col 62}{space 4}-.3284364{col 75}{space 3} 1.197522
{txt}{space 12}Foreign  {c |}{col 22}{res}{space 2} -.615446{col 34}{space 2} .1305286{col 45}{space 1}   -4.72{col 54}{space 3}0.000{col 62}{space 4}-.8715418{col 75}{space 3}-.3593501
{txt}{space 20} {c |}
{space 15}_cons {c |}{col 22}{res}{space 2}-.1441256{col 34}{space 2} .1050897{col 45}{space 1}   -1.37{col 54}{space 3}0.170{col 62}{space 4}-.3503105{col 75}{space 3} .0620593
{txt}{hline 21}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. 
{txt}end of do-file

{com}. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\Dr. Clifford\Dropbox\MTurk\MTurk Cheating\Replication Files\Log Files\retrostudy2 log.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}21 Oct 2019, 12:42:02
{txt}{.-}
{smcl}
{txt}{sf}{ul off}